//
//  GUMyGoUMenuViewController.m
//  MyGoUDome
//
//  Created by uistrong on 13-3-29.
//  Copyright (c) 2013年 uistrong. All rights reserved.
//

#import "GUMyGoUMenuViewController.h"
#import "GUMyWaypointViewController.h"
#import "GUGroupWaypointViewController.h"
#import "GUAppDelegate.h"


@interface GUMyGoUMenuViewController ()

@end

@implementation GUMyGoUMenuViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    self.title = @"我的任我游";
    UIBarButtonItem *btnLogoff = [[UIBarButtonItem alloc] initWithTitle:@"退出登陆"
                                                                style:UIBarButtonItemStylePlain target:self action:@selector(actionLogoff:)];
    self.navigationItem.rightBarButtonItem = btnLogoff;
    
//    UIBarButtonItem *btnExit = [[UIBarButtonItem alloc] initWithTitle:@"返回地图"
//                                                                style:UIBarButtonItemStylePlain target:self action:@selector(actionExit:)];
//    self.navigationItem.leftBarButtonItem = btnExit;
}

- (IBAction)actionLogoff:(id)sender
{
    //[self dismissViewControllerAnimated:YES completion:NULL];
    [self.navigationController popViewControllerAnimated:YES];
}

- (IBAction)actionExit:(id)sender
{
 //   [self dismissViewControllerAnimated:NO completion:NULL];
    
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

-(IBAction)actionWayPoint:(id)sender
{
    GUMyWaypointViewController *VC1 = [[GUMyWaypointViewController alloc] initWithNibName:@"GUMyWaypointViewController" bundle:nil];
    GUGroupWaypointViewController *VC2 = [[GUGroupWaypointViewController alloc] initWithNibName:@"GUGroupWaypointViewController" bundle:nil];
    
    VC1.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"全部航点" image:[UIImage imageNamed:@"second.png"] tag:0];
    VC2.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"分组浏览" image:[UIImage imageNamed:@"second.png"] tag:1];
    UITabBarController *tabbarVC = [[UITabBarController alloc] init];
    tabbarVC.viewControllers = [NSArray arrayWithObjects:VC1, VC2, nil];

    [self.navigationController pushViewController:tabbarVC animated:YES];
}
-(IBAction)actionRoute:(id)sender
{
    
}

-(IBAction)actionContact:(id)sender
{
    
}


-(IBAction)actionChat:(id)sender
{
    
}

-(IBAction)actionMyInfo:(id)sender
{

}

@end
